#!/bin/bash

rm -rfd build
mkdir build

python closure/library/closure/closure/bin/build/depswriter.py \
  --root_with_prefix="src ../src" > src/deps.js

python closure/library/closure/closure/bin/build/closurebuilder.py   \
    --root="closure/library/closure"                                       \
    --root="src"                                                   \
    --namespace="lfpug.Application"                                \
    --output_mode=compiled                                         \
    --compiler_flags="--compilation_level=ADVANCED_OPTIMIZATIONS"  \
    --compiler_flags="--warning_level=VERBOSE"                     \
    --compiler_flags="--jscomp_warning=checkTypes"                 \
    --compiler_jar=closure/compiler/compiler.jar             \
    > build/main.min.js